package cn.yy.pojo;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Recipt entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "recipt", catalog = "phoneerp")
public class Recipt implements java.io.Serializable {

	// Fields

	private Integer reciptId;
	private Money money;
	private Emp emp;
	private Income income;
	private Bonus bonus;
	private Sale sale;
	private Confirm confirm;
	private Client client;
	private Bankacount bankacount;
	private Payment payment;
	private Date date;
	private Double receivePrice;
	private Integer isConfirm;
	private String description;
	private Integer isUserBonse;

	// Constructors

	/** default constructor */
	public Recipt() {
	}

	/** minimal constructor */
	public Recipt(Money money, Emp emp, Income income, Bonus bonus,
			Confirm confirm, Client client, Bankacount bankacount,
			Payment payment, Date date, Double receivePrice, Integer isConfirm,
			String description, Integer isUserBonse) {
		this.money = money;
		this.emp = emp;
		this.income = income;
		this.bonus = bonus;
		this.confirm = confirm;
		this.client = client;
		this.bankacount = bankacount;
		this.payment = payment;
		this.date = date;
		this.receivePrice = receivePrice;
		this.isConfirm = isConfirm;
		this.description = description;
		this.isUserBonse = isUserBonse;
	}

	/** full constructor */
	public Recipt(Money money, Emp emp, Income income, Bonus bonus, Sale sale,
			Confirm confirm, Client client, Bankacount bankacount,
			Payment payment, Date date, Double receivePrice, Integer isConfirm,
			String description, Integer isUserBonse) {
		this.money = money;
		this.emp = emp;
		this.income = income;
		this.bonus = bonus;
		this.sale = sale;
		this.confirm = confirm;
		this.client = client;
		this.bankacount = bankacount;
		this.payment = payment;
		this.date = date;
		this.receivePrice = receivePrice;
		this.isConfirm = isConfirm;
		this.description = description;
		this.isUserBonse = isUserBonse;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "reciptId", unique = true, nullable = false)
	public Integer getReciptId() {
		return this.reciptId;
	}

	public void setReciptId(Integer reciptId) {
		this.reciptId = reciptId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "moneyId", nullable = false)
	public Money getMoney() {
		return this.money;
	}

	public void setMoney(Money money) {
		this.money = money;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "empID", nullable = false)
	public Emp getEmp() {
		return this.emp;
	}

	public void setEmp(Emp emp) {
		this.emp = emp;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "incomeId", nullable = false)
	public Income getIncome() {
		return this.income;
	}

	public void setIncome(Income income) {
		this.income = income;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "UserBonseID", nullable = false)
	public Bonus getBonus() {
		return this.bonus;
	}

	public void setBonus(Bonus bonus) {
		this.bonus = bonus;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "saleID")
	public Sale getSale() {
		return this.sale;
	}

	public void setSale(Sale sale) {
		this.sale = sale;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "confirmId", nullable = false)
	public Confirm getConfirm() {
		return this.confirm;
	}

	public void setConfirm(Confirm confirm) {
		this.confirm = confirm;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "clientId", nullable = false)
	public Client getClient() {
		return this.client;
	}

	public void setClient(Client client) {
		this.client = client;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "bankAcountId", nullable = false)
	public Bankacount getBankacount() {
		return this.bankacount;
	}

	public void setBankacount(Bankacount bankacount) {
		this.bankacount = bankacount;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "paymentId", nullable = false)
	public Payment getPayment() {
		return this.payment;
	}

	public void setPayment(Payment payment) {
		this.payment = payment;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "date", nullable = false, length = 10)
	public Date getDate() {
		return this.date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	@Column(name = "receivePrice", nullable = false, precision = 22, scale = 0)
	public Double getReceivePrice() {
		return this.receivePrice;
	}

	public void setReceivePrice(Double receivePrice) {
		this.receivePrice = receivePrice;
	}

	@Column(name = "isConfirm", nullable = false)
	public Integer getIsConfirm() {
		return this.isConfirm;
	}

	public void setIsConfirm(Integer isConfirm) {
		this.isConfirm = isConfirm;
	}

	@Column(name = "description", nullable = false, length = 20)
	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@Column(name = "isUserBonse", nullable = false)
	public Integer getIsUserBonse() {
		return this.isUserBonse;
	}

	public void setIsUserBonse(Integer isUserBonse) {
		this.isUserBonse = isUserBonse;
	}

}